package com.backwaveweibo.bww.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * @author GHW : RD-Kelsey
 * @description 用户 User 实体
 * @date 2020/6/8
 * <p>
 * userId : 用户id
 * username : 用户名
 * password : 密码
 * description : 个人简介
 * type : 用户类型
 * address : 地址
 * sex : 性别
 * nickname : 昵称
 * registerDate : 用户注册日期
 * weiboList : 一对多；一用户多微博
 * commentsList : 一对多；一用户多评论
 * <p>
 */

@Data
@ToString
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User {
    private Long userId;
    private String username;
    private String password;
    private String description;
    private String type;
    private String address;
    private String sex;
    private String nickname;
    private String registerDate;
    private String photo;

    private List<Weibo> weiboList = new ArrayList<>();

    private List<Comments> commentsList = new ArrayList<>();
}
